package com.dc.project.basics.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 计量单位表(BasUnit)实体类
 *
 * @author zhuangcy
 * @since 2021-06-11 14:40:04
 */
@TableName("bas_unit")
@Data
@ApiModel(value = "计量单位表")
public class BasUnit implements Serializable {
    private static final long serialVersionUID = -98672732982091590L;
    /**
     * 单位id
     */
    @NotNull(message = "单位id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "unit_id", type = IdType.AUTO)
    @ApiModelProperty(name = "unitId", value = "单位id")
    private Integer unitId;
    /**
     * 单位编码
     */
    @NotNull(message = "单位编码不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "unit_code")
    @ApiModelProperty(name = "unitCode", value = "单位编码")
    private String unitCode;
    /**
     * 单位名称
     */
    @NotNull(message = "单位名称不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "unit_name")
    @ApiModelProperty(name = "unitName", value = "单位名称")
    private String unitName;
    /**
     * 状态（0正常 1停用）
     */
    @TableField(value = "status")
    @ApiModelProperty(name = "status", value = "状态（0正常 1停用）")
    private String status;
    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(name = "delFlag", value = "删除标志（0代表存在 1代表删除）")
    private String delFlag;
    /**
     * 创建者id
     */
    @TableField(value = "created_id", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdId", value = "创建者id")
    private Integer createdId;
    /**
     * 创建者
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdBy", value = "创建者")
    private String createdBy;
    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;
    /**
     * 更新者id
     */
    @TableField(value = "updated_id", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedId", value = "更新者id")
    private Integer updatedId;
    /**
     * 更新者
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedBy", value = "更新者")
    private String updatedBy;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedTime", value = "更新时间")
    private Date updatedTime;


}